import Layout from '@/layouts'

/**
 * 异步:动态路由  商城管理
 */
const MallRoute = {
  path: '/mall',
  component: Layout,
  name: '商城管理',
  icon: 'mall',
  meta: { 
		title: '商城管理' ,
		icon: 'mall'
  },
  authCode: 'mall',
  children: [{
	path: 'brand',
	icon: 'brand',
	component: () => import('@/views/modules/mall/brand/list'),
	name: '品牌管理',
	meta: { 
		title: '品牌管理',
		icon: 'brand'
	},
	authCode: 'mall:brand',
	children:[
	{
		path: 'view',
		component: () => import('@/views/modules/mall/brand/view'),
		name: '查看详情',
		meta: {
			title: '查看品牌详情',
		},
		hidden: true
	},{
		path: 'add',
		component: () => import('@/views/modules/mall/brand/add'),
		name: '新增品牌',
		meta: {
			title: '新增品牌',
		},
		hidden: true
	},{
		path: 'edit',
		component: () => import('@/views/modules/mall/brand/edit'),
		name: '修改品牌',
		meta: {
			title: '修改品牌',
		},
		hidden: true
	},
	{
		path: 'relation',
		component: () => import('@/views/modules/mall/brand/relation/list'),
		name: '关联分类',
		meta: {
			title: '关联分类',
		},
		hidden: true,
		children:[{
			path: 'add',
			component: () => import('@/views/modules/mall/brand/relation/add'),
			name: '绑定分类',
			meta: {
				title: '绑定分类',
			},
			hidden: true,
		}]
	}]
	},{
	path: 'category',
	icon: 'category',
	component: () => import('@/views/modules/mall/category/list'),
	name: '分类管理',
	meta: { 
		title: '分类管理',
		icon: 'category'
	},
	authCode: 'mall:category',
	children:[
	{
		path: 'view',
		component: () => import('@/views/modules/mall/category/view'),
		name: '查看详情',
		meta: {
			title: '查看分类详情',
		},
		hidden: true
	},{
		path: 'add',
		component: () => import('@/views/modules/mall/category/add'),
		name: '新增分类',
		meta: {
			title: '新增分类',
		},
		hidden: true
	},{
		path: 'edit',
		component: () => import('@/views/modules/mall/category/edit'),
		name: '修改分类',
		meta: {
			title: '修改分类',
		},
		hidden: true
	}]
	},
	{
	path: 'goods',
	icon: 'goods',
	component: () => import('@/views/modules/mall/goods/spu/list'),
	name: '商品管理',
	meta: { 
		title: '商品管理',
		icon: 'goods'
	},
	authCode: 'mall:goods',
	children: [
		{
			path: 'add',
			component: () => import('@/views/modules/mall/goods/add'),
			name: '新增商品',
			meta: {
				title: '新增商品',
			},
			hidden: true
		},
		{
			path: 'view',
			component: () => import('@/views/modules/mall/goods/spu/view'),
			name: '查看商品',
			meta: {
				title: '查看商品',
			},
			hidden: true
		},
		{
			path: 'edit',
			component: () => import('@/views/modules/mall/goods/spu/edit'),
			name: '修改商品',
			meta: {
				title: '修改商品',
			},
			hidden: true
		},
		{
			path: 'sku',
			component: () => import('@/views/modules/mall/goods/sku/list'),
			name: '查看sku',
			meta: {
				title: '查看sku',
			},
			hidden: true,
			children:[
				{
					path: 'view',
					component: () => import('@/views/modules/mall/goods/sku/view'),
					name: '查看商品',
					meta: {
						title: '查看商品',
					},
					hidden: true
				},
				{
					path: 'edit',
					component: () => import('@/views/modules/mall/goods/sku/edit'),
					name: '修改商品',
					meta: {
						title: '修改商品',
					},
					hidden: true
				},
			]
		},
	]
	},
	{
	path: 'template',
	icon: 'moban',
	component: () => import('@/views/modules/mall/template/list'),
	name: '模版管理',
	meta: { 
		title: '模版管理',
		icon: 'moban'
	},
	authCode: 'mall:template',
	children:[{
		path: 'add',
		component: () => import('@/views/modules/mall/template/add'),
		name: '新增模版',
		meta: {
			title: '新增模版',
		},
		hidden: true
	},
	{
		path: 'edit',
		component: () => import('@/views/modules/mall/template/edit'),
		name: '修改模版',
		meta: {
			title: '修改模版',
		},
		hidden: true
	},{
		path: 'spec',
		component: () => import('@/views/modules/mall/template/spec/list'),
		name: '属性列表',
		meta: {
			title: '属性列表',
		},
		hidden: true,
		children:[
			{
				path: 'add',
				component: () => import('@/views/modules/mall/template/spec/add'),
				name: '新增规格',
				meta: {
					title: '新增规格',
				},
				hidden: true
			},{
				path: 'edit',
				component: () => import('@/views/modules/mall/template/spec/edit'),
				name: '修改规格',
				meta: {
					title: '修改规格',
				},
				hidden: true
			}
		]
	},{
		path: 'parameter',
		component: () => import('@/views/modules/mall/template/parameter/list'),
		name: '参数列表',
		meta: {
			title: '参数列表',
		},
		hidden: true,
		children:[
			{
				path: 'add',
				component: () => import('@/views/modules/mall/template/parameter/add'),
				name: '新增参数',
				meta: {
					title: '新增参数',
				},
				hidden: true
			},{
				path: 'edit',
				component: () => import('@/views/modules/mall/template/parameter/edit'),
				name: '修改参数',
				meta: {
					title: '修改参数',
				},
				hidden: true
			}
		]
	}]
	}
  ]
}
export default MallRoute